<!DOCTYPE html>
<html>
    
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
        <title>query.empty</title>
        <script>
            window.$$path = location.protocol + "//" + location.host;
            document.write('<script src="' + $$path + '/mass_merge.js"><\/script>');
            document.write('<script src="' + $$path + '/doc/scripts/common.js"><\/script>');
        </script>
        <style type="text/css">
            ul{
                list-style-image: url(../public/images/li.gif)
            }
            .list {
                color:#FF6363;
                font-weight:bolder;
            }
            table.clicktable {
                border-collapse:collapse;
                border:#8a6100 1px solid;
            }
            table.clicktable th{
                border:#8a6100 2px solid;
                border-color:  #ffe3a4 #ffe3a4 #8a6100 #8a6100;
                color: #ffff00;
                background:#e19d00;
            }
            table.clicktable td{
                border:#8a6100 1px   inset;
                background:#EEE8AA;
                color:#000;
            }
            table.clicktable tr.even td{
                background:#FF7F50;
                color:#8B4513;
            }
        </style>
        <script type="text/javascript">
            $(function(){
                $("body").delegate(".clicktable tbody td","click",function(){
                    var input =  $("input[type=checkbox]:first")
                    if(input.length){
                        input[0].indeterminate = true;
                    }
                    var code = $.String.unescapeHTML( this.innerHTML )
                    $.parseJS( code );
                });
            })
        </script>
    </head>
    
    <body>
        <article>
            <style type="text/css">
                .focused {
                    background: #abcdef;
                }
                #sample {
                    border: 1px solid #000;
                    border-collapse: collapse;
                }
                #sample td{
                    text-align: center;
                }
            </style>
            <p>空伪类，:empty，CSS3的结构伪类之一，与:parent伪类相反，如果它一个孩子也没有则被选中。</p>
            <fieldset>
                <legend>例子</legend>
                <table class="clicktable" cellspacing="0" width="700" rules="cols">
                    <thead>
                        <tr>
                            <th>请点击下面表格</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>$("td:empty").text("Was empty!").css('background', 'rgb(255,220,200)');</td>
                        </tr>
                    </tbody>
                </table>
                <pre class="brush:xml;gutter:false;toolbar:false">

     <table id="sample">
        <tr><td>TD #0</td><td></td></tr>
        <tr><td>TD #2</td><td></td></tr>
        <tr><td></td><td>TD#5</td></tr>
    </table>
    
</pre>
                <table id="sample">
                    <tr>
                        <td>TD #0</td>
                        <td></td>
                    </tr>
                    <tr>
                        <td>TD #2</td>
                        <td></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>TD#5</td>
                    </tr>
                </table>
            </fieldset>
        </article>
    </body>

</html>